import request from '@/utils/request';
import { toFormData } from '@/utils/utils.jsx';
import { stringify } from 'qs';

//店铺名称模糊
export async function getStoreName() {
  return request(`/zjf-erp-spd/spdPrint/fetchRemoteStoreList`);
}

//快递公司列表
export async function getIndexExpressList(params) {
	return request(`/blade-logistics/expresskxerp/expressKv?${stringify(params)}`);
}

//用户仓库下拉列表
export async function getWarehouseList(params) {
  return request(`/zjf-wms/channel/queryTypeChannel?${stringify(params)}`);
}

//获取物流列表
export async function logisticsListNew(params) {
  return request(`/new-oms-ec/orderBackFlowDetails/page`, {
		method: 'post',
		data: params
	});
}

//重新上传&取消上传
export async function updateStatus(params) {
  return request(`/new-oms-ec/orderBackFlowDetails/reFlow`, {
    method: 'POST',
    data: params
  });
}

//取消回传
export async function cancel(params) {
  return request(`/zjf-oms/backflowJob/cancelUpload`, {
    method: 'POST',
    body: toFormData(params)
  });
}

//重新上传
export async function again(params) {
  return request(`/zjf-oms/backflowJob/uploadAgain`, {
    method: 'POST',
    data: params
  });
}

//获取物流列表
export async function logisticsList(params) {
  return request(`/zjf-oms/backflowOrder/page?${stringify(params)}`);
}
